#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>

int main()
{
	
	mode_t old = umask(0022);
	int fd = open("abc.txt" , O_RDWR | O_CREAT , 0666);
	umask(old);

	struct stat buf ;
	stat("abc.txt",&buf);
 	printf("%o\n , ",buf.st_mode);
}
